package com.woniu.tank.boom;

import java.awt.Graphics;
import java.awt.Image;

import javax.swing.JPanel;

import com.woniu.tank.ui.GamePanel;

public class Boom {
	//爆炸坐标
	protected int x;
	protected int y;

	//爆炸时间
	private int time;
	GamePanel tc;
	public Boom() {

	}
	public Boom(int x, int y, GamePanel tc) {
		this.x = x;
		this.y = y;
		this.tc = tc;
	}
	//绘制爆炸图片
	public void drawBoom(Graphics g, JPanel p , Image boom){
		g.drawImage(boom, x*32, y*32, (x+1)*32, (y+1)*32, 20, 20,110, 110, p);
		time++;
		if(time>1){
			GamePanel.boomtk.remove(this);
		}		
	}
	
}
